The Oblivion Graphics Extender is an OBSE plugin created by Timeslip that adds extra functionality to Oblivion's scripting language, focussed on the implementation and manipulation of graphics effects. It adds support for fullscreen shaders and extra HUD elements, provides information about graphics memory and screen resolution and allows you to clear some of oblivions textures from graphics memory.
Without Timeslip's original version Scanti probably wouldn't of known where to start in writing this project, so kudos to him. You can find Timeslip's Oblivion Graphics Extender here.
A number of mods take advantage of OBGE for their effects. These include:
This was a project started by IlmrynAkios that was dedicated to making Oblivion look better using various filters and low-level DirectX tricks, utilising OBGE for its effects. It spurred the discussion on the improvement of various areas of Oblivion's graphics, leading to a few released mods and some affiliated mods, proposed as part of the project but developed separately, being released. These are:
The project is currently on haitus as various difficulties in its progression occurred, and IlmrynAkios found that his time available for work on it was becoming very limited.
A continuation of both Timeslip's work on expanding the functionality to Oblivion's scripting language regarding the implementation and manipulation of graphics effects and OVEP's work in making Oblivion looking better using a variety of graphical effects, OBGEv2 is the name of Scanti's rewrite of the OBGE OBSE plugin and the accompanying project that is focussed on the creation of various post-processing effects to improve Oblivion's graphics.
Scanti's rewrite of OBGE is centered around the exposure of more information about Oblivion's graphical processes and the fixing of bugs present in the original. The original OBGE should not be used alongside OBGEv2, which should be backwards-compatible with OBGE mods.
The modders that make up this project work hard to bring you the effects they create, so please respect them for taking the time to do so. If you would like to contribute, please feel free to participate in the sharing of knowledge and ideas to help us strive to complete our goal. If you are able to find useful resources that can benefit the project, please feel free to share them as well. This project is in a Beta Phase and will probably be in that state forever as add new things are added to it. Expect bugs when using newly created shaders, or when using/tweaking the shaders on your own.
Due to the Work In Progress nature of OBGEv2, few mods have been made to use it, but these include:
In addition, all OBGE mods may be used with OBGEv2 instead of OBGE.
OBGEv2 has a few prerequisites that must be installed prior to installing and using OBGEv2. These are:
Make sure that you have first downloaded and installed the prerequisites. This readme assumes that you are only interested in installing the OBGEv2 Core package for the OBGEv2 OBSE plugin. If you are also interested in using the OBGEv2 project shaders, download the OBGEv2 Shaders package from the project TES Nexus page and follow the instructions in its ReadMe.
Once you have installed the prerequisites, download from the TES Nexus page the OBGEv2 Core package, then do the following to install OBGEv2 correctly:
Oblivion\Data directory. Answer yes to any merge or overwrite prompts.The files in the "Extras" folder are:
Safe uninstallation of OBGEv2 should be as simple as deleting the files that you installed, the most important being Data\OBSE\Plugins\OBGEv2.dll.
However, if that causes problems for you, then below is a more thorough uninstallation procedure:
bSaveData=0 in your OBGE.ini, found in your My Documents\My Games\Oblivion folder.Data\Shaders\RAWZfix.fx file, as well as any files in the 'Extras' folder you installed.You should now be able to run Oblivion without OBGEv2 and avoid any problems. If you are still experiencing problems after following this procedure, seek further assistance in the official forum thread.
Read this readme fully, as well as the Bethesda forum thread, especially the FAQs. If your problem is not answered there, do the following:
Supply the following:
The above documents should be posted exactly how they appear in the file, in spoiler (ie. [spoiler]content[/spoiler]) tags.
In addition, if what you are experiencing is a graphical bug of some kind, you should supply screenshots. It has been noted that Oblivion's screenshot function may not work with OBGEv2 installed, so in that case use FRAPS or some other 3rd party screenshot tool. You can convert the image from .bmp to .jpg in Wrye Bash. Upload the screenshot and post a link to it, so we can see what your problem actually looks like.
If your bug is with a shader effect, and you have altered any variables within the shader, also post the lines on which you changed anything, exactly how they are in the shader, again in spoiler tags.
We can't really help all that well without the above information, as especially with graphical errors, it can hard to describe them in writing in a way that we will be able to understand what's going on.
Q: Is this a RELz? Should I download this?
A: This is a Beta (and hopefully stable) release. It will always be a work in progress and could contain bugs
from time to time. If the thought of this scares you then this probably isn't the mod for you.
In addition, because this deals with the details of how graphics are displayed on your screen, results vary with people's hardware. Most people have no trouble using it, but occasionally someone finds that OBGEv2 does not work with their hardware.
Q: Does this require OBSE? If so, any specific version?
A: Yes, it does require OBSE, and you must use at least v0019, however you are advised to use the latest version available.
Q: Does OBGEv2 require any specific hardware to run?
A: No. Although it may not work correctly with some hardware, this is a bug, but we do not possess enough information on it to say which precise hardware experiences problems. In addition, some OBGEv2 shaders do require a Shader Model 3 compliant graphics card. Any NVIDIA graphics card that is GeForce 6 Series (released 2004) or newer supports Shader Model 3.0. Any ATI graphics card that is Radeon X1000 Series (released 2005) or newer supports Shader Model 3.0. More details on that are given in the OBGEv2 Shaders package's readme.
Q: How do I get involved with this project?
A: There are a few ways that you can get involved:
If you can write shader code, then you can get stuck in making your own effects right away. The shaders can be written in
either HLSL or ASM.
If you can write in C/C++, then perhaps you would be able to help Scanti and shadeMe in their work on the OBSE plugin. The project has a github respository
so you can fairly easily create a fork and add your own changes. This site also allows you to create your own wiki pages for the project, which you are more than welcome to contribute to.
It would also be beneficial if you know anything about low-level DirectX and the OBSE plugin system.
If you can't do either of these things, you can still contribute support, articles and papers on graphical effects that could
be implemented in Oblivion, and whatever else you can bring to the project. Especially cake or ice cream.
Q: I found a bug...
A: Good for you. If you find a bug, please report it as detailed in the 'How To Report Bugs Helpfully' section above. We can help you more when you explain the problem better.
Q: I cannot see an effect I have installed, and my OBGEv2 log has the line "Failed to load" after the line
"Loading shader (
A: This results from OBGEv2's inability to compile the shader effects you are trying to load. Make sure that you have the DirectX update linked to above installed, and if using a shaderlist, that you have spelled the names of the shaders in your shaderlist.txt exactly as they should be, with the .fx extension. In the case of some effects, you must also have a graphics card that is Shader Model 3 compliant.
Q: ScreenEffects/Realistic Health/OVEP Motion Blur/OVEP Forward Motion Blur or setting bUseLegacyCompiler to 1 causes OBGEv2 to crash. How do I fix this?
A: If your shader uses the half variable type then OBGEv2 will try to use the legacy compiler. If you are missing the d3dx9_31.dll file then OBGEv2 will crash. You will need to copy over the d3dx9_31.dll from the Extras folder into your Oblivion game folder to fix the problem.
Q: The ordering of the objects on the screen is messed up or the game menu has no buttons! Why is this happening?
Q: Once I got the effects to work, my AA disappeared? WHY?!?
A: The method used to expose the information used to read the depth buffer is incompatible with Anti-Aliasing. This is reported to be the case on both ATI and NVIDIA graphics cards, although owners of ATI graphics cards can force AA through ATI Tray Tools without problems. The only solution is to edit the OBGE.ini file in your My Documents\My Games\Oblivion folder and change this line:
[DepthBuffer]
bUseDepthBuffer=1
to:
[DepthBuffer]
bUseDepthBuffer=0
This will however cause any shader effect that uses the depth buffer to stop working properly. From the OBGEv2 shaders, this currently includes all the SSAO and Depth of Field shaders and the
Godrays, NormalFilterAA and CelShader+EdgeAA shaders.
Q: After installing this I am getting mouse lag; how can I fix this?
A: Try lowering the value of the iBufferTexturesNumBits settinng in your OBGE.ini. Some users have reported that doing so eliminates mouse lag.
Q: Where is the src folder with the source code?
A: The source is not included in the package. Instead, it is available on the GitHub repository. That means you will always have access to the latest version of the code and people can contribute their own code to the project.
Q: Oblivion is crashing on exit, and it didn't before. What gives?
A: Some users may find that Oblivion crashes on exit when using OBGEv2, even when using a crash solution such as FastExit2. This is due to a bug that may occur in the plugin that results in some memory not being cleared properly. It will be fixed in a future update of OBGEv2.
The commands below are added by the OBGEv2 plugin for use in mod scripts. Please note that the HUD commands are not yet fully supported and are not saved in a save game.
<int ShaderID> LoadShader <string filename> <opt int AllowDuplicates=0>
Loads a shader effect file (*.fx) specified by the filename. It will look for the file relative to the data\shaders folder.
If the allow duplicates flag is true then the code will load duplicates of the shader otherwise if it's false then if a
esp/esm tries to load 2 or more shaders of the same filename then LoadShader will return the ID of the previously loaded
shader. The command will return the ID of the shader that's loaded. If there was an error loading the shader then the
command will return -1. Any shader that's loaded in will automatically be activated.
<int> ApplyFullscreenShader <int ShaderID> <opt int EffectHUD=0>
This command will turn on a previously loaded shader identified by it's ID. The EffectHUD parameter has no effect at the
moment. The command will return 0 if succeeds or -1 if it fails.
<int> RemoveFullscreenShader <int ShaderID> <opt int PermanentlyDelete=0>
This will turn off a previously loaded shader identified by it's ID. If the PermanentlyDelete parameter is set to true then
it will also remove the shader from the computers memory and you can't use it again until it's reloaded in.
SetShaderInt <int ShaderID> <string VariableName> <int value>
Sets a global integer variable in a loaded effect file.
SetShaderFloat <int ShaderID> <string VariableName> <float value>
Sets a global float variable in a loaded effect file.
SetShaderVector <int ShaderID> <string VariableName> <float value[0]> <float value[1]> <float value[2]> <float value[3]>
Sets a global vector (array of 4 floats) variable in a loaded effect file.
SetShaderTexture <int ShaderID> <string TextureVariableName> <int TextureID>
Sets a global texture in a loaded effect file. The texture must of been previously loaded into the computers memory
using the LoadTexture command.
<int IsEnabled> IsShaderEnabled <int ShaderID>
Returns 1 if the shader specified by the shader id is available for use.
<int TextureID> LoadTexture <string filename> <int FromFile>
Loads a texture into the computers memory for use by a HUD element or shader. It will load in textures relative to the
data\textures folder. If the FromFile parameter is false then any loaded texture will get resized the nearest power of 2. i.e.
if the texture is 400x150 it will get resized to 512x256. If the parameter is true then the texture will keep it's dimensions
but some graphics cards may fail to load the texture.
FreeTexture <int TextureID>
Will unload a previously loaded texture from the computers memory.
<int AvailableMemory> GetAvailableGraphicsMemory
Will return an approximation of the free graphics card memory.
<int Width> GetScreenWidth
Returns the width of screen or window if you are running in windowed mode.
<int Height> GetScreenHeight
Returns the height of the screen or window if you are runing in windowed mode.
ForceGraphicsReset
This command isn't implemented in OGBEv2. It is left in for legacy reasons.
PurgeManagedTextures
This will unload any managed textures from your graphics card and place a copy of them in the computers memory if a copy
doesn't already exist.
<int HUDElementID> CreateHUDElement
Creates a container for a sprite.
SetHUDElementTexture <int HUDElementID> <int TextureID>
Assigns a previously loaded texture to a sprite. Set TextureID to -1 to stop a sprite from rendering.
SetHUDElementColour <int HUDElementID> <float red> <float green> <float blue>
Sets the colour of a sprite. The red. green and blue colours are in the range of 0 to 1.
SetHUDElementPosition <int HUDElementID> <float xPos> <float yPos>
Sets the screen postion of the sprite.
SetHUDElementScale <int HUDElementID> <float ScaleX> <float ScaleY>
Sets the scale of a sprite.
SetHUDElementRotation <int HUDElementID> <float RotationAngle>
Sets the angle of rotation of a sprite.
These constants contain the information that OBGEv2 exposes, and that you may access from shaders.
<texture> thisframe
The current frame's texture or the texture from the last rendered shader.
<texture> lastpass
The texture of the last pass in a multipass effect.
<texture> lastframe
The last frame that was rendered texture.
<texture> Depth
This texture contains the depth buffer.
<float2> rcpres
This contains the reciprocal of the screen resolution. i.e. 1/width, 1/height.
<bool> bHasDepth
True if there is a valid depth texture.
<float4x4> m44world
The world matrix. The translation data of the camera.
<float4x4> m44view
The view matrix. The rotational and scale data of the camera.
<float4x4> m44proj
The projection matrix.
<float4> f4SunDir
This contains the direction of the sun from the camera's position as a unit vector.
Ignore the w value for now. I may add a value to it later.
<float3> f3EyeForward
This is the forward unit vector of the camera.
Basically it tells you which direction the camera is pointing in.
<float4> f4Time
This contains the current game time.
[0]/x = number of seconds passes in that current game day.
[1]/y = game time hour
[2]/z = game time minutes
[3]/w = game time seconds
So if the game time is 5.30 and 10 seconds then f4Time would equal - [19810,5,30,10]
<texture> textureName < string filename="textureFilename"; >;
This loads a texture file into your shader, given by the filename string, which is relative to the data\textures directory.
When you first run OBGEv2 it will create a file called OBGE.ini in your My Documents\My Games\Oblivion folder. You can edit this file to change the behaviour of OBGE.
[DepthBuffer]
bUseDepthBuffer - Turns on and off the creation of a readable depth buffer.
bUseRAWZfix - Activates a fix for graphics cards that use the RAWZ depth buffer format.
[Serialization]
bSaveData - Remembers the shaders loaded in by mods when you save the game.
bLoadData - Loads in the shaders previously saved in a save game.
[Shaders]
bUseShaderList - Turns on or off the reading of the ShaderList.txt file.
sShaderListFile - Allows you to change the name of the ShaderList.txt file.
bUseLegacyCompiler - This will use the old version of Microsoft's HLSL compiler. It may give a speed increase for older
graphics cards. If the game crashes when using this setting then copy the d3dx9_31.dll from the extras folder into your
oblivion game folder (the one with oblivion.exe in it).
bNoShadersInMenus - Turns off the shader system whenever a menu is displayed.
bRenderHalfScreen - Only renders the shaders to the right hand side of the screen. This is useful for comparing the shader with
the normal rendered screen.
[PluginInterOp]
bEnableInterOp - This setting current doesn't do anything. However in the future it will allow other OBSE plug-ins to access
OBGEv2.
[General]
bEnabled - Setting this to 0 will disable the plug-in but still process the script commands (they just won't do anything).
[ScreenBuffers]
iBufferTexturesNumBits - This allows you to set the bit depth of the frame buffers used by the shaders. Different bit depths
may increase the accuracy and speed of some shaders. Valid settings are 8, 16 and 32. If your card doesn't support a certain
bit depth then the next lowest is tried. Some users that have had issues with input lag when using OBGEv2 have reported that lowering this value solves their issues.
Only updates to the OBGEv2.dll OBSE plugin are recorded here. For updates to the files contained within the OBGEv2 Shaders package, see that package's readme.
Version 4
Version 3
Version 2
Version 1
Initial pre-alpha test release.